home *** CD-ROM | disk | FTP | other *** search
- l 200 2 0 1
- a
- mov si,5d ;location of 2nd argument
- mov di,22a ;location in above buffer (0x200) of serial number
- mov dx,4 ;number of digits in serial number
- cld ;load going forward
- lodsb
- cmp al,39 ;check if a letter
- jbe 113
- and al,5f ;make sure we have upper case
- sub al,37 ;convert 'a'-'f' to hex value
- and al,0f ;make sure we only have a single hex digit
- mov cl,4 ;store the first in hi nibble
- shl al,cl
- mov bl,al ;save it away
- lodsb ;load next digit
- cmp al,39 ;process the same as the previous digit
- jbe 124
- and al,5f
- sub al,37
- and al,0f
- or al,bl ;and combine this low nibble with high nibble
- std ;we need to store going backward (MSB in high mem)
- stosb
- dec dx ;decrement loop counter
- jnz 109
- int 3 ;go back to debugger
-
- g=100
- w 200 2 0 1
- a 100
- jmp f000:fff0 ;jump to reboot address
-
- g=100